home *** CD-ROM | disk | FTP | other *** search
- package
- {
- import flash.display.Sprite;
- import flash.events.Event;
-
- public class RunningKnight extends Sprite
- {
-
-
- private var §\x01\x01\x02\t§:*;
-
- private var §\x01\x01\x02\x0b§:*;
-
- public var enemyChar:*;
-
- private var §\x01\x01\x02\r§:*;
-
- private var scoreMgr:*;
-
- private var §\x01\x01\x02\x0e§:*;
-
- private var §\x01\x01\x02\x0f§:*;
-
- private var §\x01\x01\x02\x10§:*;
-
- private var §\x01\x01\x03\x01§:*;
-
- private var §\x01\x01\x03\x02§:*;
-
- public var mainChar:*;
-
- private var §\x01\x01\x03\x03§:Boolean = false;
-
- public function RunningKnight(param1:*)
- {
- §\x01\x01\x03\x03§ = false;
- super();
- §\x01\x01\x02\t§ = param1;
- }
-
- private function §\x01\x01\x02\n§(param1:Event) : *
- {
- if(§\x01\x01\x03\x03§ && §\x01\x01\x02\x10§.GetKnightStatus() == 999)
- {
- StopGame(true);
- §\x01\x01\x02\t§.removeEventListener(Event.ENTER_FRAME,§\x01\x01\x02\n§);
- }
- }
-
- public function PlaySound(param1:int) : *
- {
- §\x01\x01\x03\x01§.stopBgm();
- if(param1 > 0)
- {
- §\x01\x01\x03\x01§.playBgm(param1);
- }
- }
-
- public function §\x01\x01\x02\f§() : *
- {
- §\x01\x01\x03\x01§.stopBgm();
- }
-
- public function GetScore() : int
- {
- return scoreMgr.GetScore();
- }
-
- public function StopGame(param1:*) : *
- {
- §\x01\x01\x03\x01§.stopBgm();
- §\x01\x01\x02\r§.StopGame();
- scoreMgr.StopGame();
- §\x01\x01\x02\x10§.StopGame();
- §\x01\x01\x02\x0f§.StopGame();
- §\x01\x01\x03\x02§.StopGame();
- §\x01\x01\x02\x0b§.StopGame();
- §\x01\x01\x03\x03§ = false;
- if(param1)
- {
- §\x01\x01\x02\x0e§.ShowGameOver();
- }
- else
- {
- §\x01\x01\x02\x0e§.ShowEndMovie();
- }
- }
-
- public function StartGame() : *
- {
- §\x01\x01\x03\x01§.stopBgm();
- §\x01\x01\x03\x01§.playBgm(2);
- §\x01\x01\x02\r§.StartGame();
- scoreMgr.StartGame();
- §\x01\x01\x02\x10§.StartGame();
- mainChar = §\x01\x01\x02\x10§.theKnight;
- §\x01\x01\x02\x0f§.StartGame();
- enemyChar = §\x01\x01\x02\x0f§.theDragon;
- §\x01\x01\x03\x02§.StartGame();
- §\x01\x01\x02\x0b§.StartGame();
- §\x01\x01\x03\x03§ = true;
- §\x01\x01\x02\t§.addEventListener(Event.ENTER_FRAME,§\x01\x01\x02\n§,false,0,true);
- }
-
- public function GetPercentDone() : int
- {
- return §\x01\x01\x03\x02§.obstacleCount / 2;
- }
-
- public function Exec() : *
- {
- §\x01\x01\x02\r§ = new WorldManager(§\x01\x01\x02\t§,this);
- scoreMgr = new ScoreManager(§\x01\x01\x02\t§,§\x01\x01\x02\r§);
- §\x01\x01\x02\x0e§ = new MenuManager(§\x01\x01\x02\t§,§\x01\x01\x02\r§,this);
- §\x01\x01\x03\x01§ = new SoundManager();
- §\x01\x01\x02\x10§ = new PlayerManager(§\x01\x01\x02\t§,§\x01\x01\x02\r§,scoreMgr);
- §\x01\x01\x02\x0f§ = new EnemyManager(§\x01\x01\x02\t§,§\x01\x01\x02\r§,this);
- §\x01\x01\x03\x02§ = new ObstacleManager(§\x01\x01\x02\t§,§\x01\x01\x02\r§,this);
- §\x01\x01\x02\x0b§ = new ItemManager(§\x01\x01\x02\t§,§\x01\x01\x02\r§,§\x01\x01\x02\x10§);
- §\x01\x01\x02\x0e§.CreateMainMenu();
- }
- }
- }
-